<div class="blogArchive">
    <div class="box_head">
        <h3>Katagori Produk</h3>
    </div>
    <ul id="dropcat">
        <?php
        $m_katagori = new M_katagori();
        $list = $m_katagori->get_where(array('parentid' => 0));
        echo "<li>" . anchor("main/produk/", "Semua Katagori") . "</li>";
        $n = 1;
        foreach ($list as $row) {
            echo "<li>" . anchor("main/produk/per_katagori/$row->id", $row->nama_katagori);
			$id = $row->id;
			$list2 = $m_katagori->get_where(array('parentid' => $id));
			echo "<ul>";
			foreach ($list2 as $row2) {
				echo "<li style='padding-left:20px; font-weight:100;'>" . anchor("main/produk/per_katagori/$row2->id", $row2->nama_katagori) . "</li>";
			}
			echo "</ul></li>";
            $n++;
        }
		
        ?>
    </ul>
	
	<script type="text/javascript">
        $('#dropcat li').find('ul').hide();
		$('#dropcat li').hover(function() {
				$(this).find('ul').show();
			},
			function() {
			  $(this).find('ul').hide();
		});
    </script>
</div>

<div class="blogArchive">
    <div class="box_head">
        <h3>News</h3>
    </div>
   <ul id="dropnews">
       <?php
        $m_news = new M_news();
        $list = $m_news->where(array('status' => '1'))->limit(4)->order_by("datekeyin", "desc")->get();
        $n = 1;
		echo "<li>" . anchor("main/news/", "Semua Berita") . "</li>";
        foreach ($list as $row) {
			$postdate	= date('d M Y',strtotime($row->datekeyin)); // tanggal posting
			$news		= nl2br($row->news); // membuat paragraf pada isi berita
			echo "<li>" . anchor("main/news/detail/$row->newsid", $row->title);
			echo "<ul>" . $postdate . "<br>". $news ."</ul>";
            echo "</li>";
			$n++;
        }
        ?>
    </ul>
	
	<script type="text/javascript">
        $('#dropnews li').find('ul').hide();
		$('#dropnews li').hover(function() {
				$(this).find('ul').show();
			},
			function() {
			  $(this).find('ul').hide();
		});
    </script>
</div>

<div class="blogArchive">

    <div id="widget_jne_id"></div>
    <script type="text/javascript" src="http://www.widgetku.com/web/libs/wjne_v1_6.js"></script>
    <script type="text/javascript">
        init_widget_jne(220,360,"CEK TARIF & RESI JNE","","#000000","138435982952732700")
    </script> 
</div>

